<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="shortcut icon" href="">
    <title>AStar</title>
    <style type="text/css">
        body {
            background-color: #eccc68;
        }

        canvas {
            width: 400px;
            height: 300px;
            border: 1px solid black;
        }
    </style>
</head>

<body>
    <h1>AStar</h1>
    <script type="module">
        import {createCanvas, vector2, animation, mouse, curve, circle, rect, line, fill, stroke, lineWidth, frame, noloop} from './spring/board.js'
        import {Particle, Spring} from './spring/object.js'

        const width = 1200, height = 800, w = 50
        createCanvas(width / 2, height / 2)
        function draw() {
            let verties = [{x: 100, y: 100}, {x: 200, y: 100}, {x: 200, y: 200}, {x: 100, y: 200}, {x: 100, y: 300}, {x: 200, y: 300}, {x: 200, y: 400}, {x: 100, y: 400}]
            lineWidth(5)
            curve(verties, stroke)

        }
        if (-1) {
            console.log(-1)
        }

        function getCtrlPoint(ps, i, a, b){
            if(!a||!b){
                a=0.25; b=0.25;
            }
        }
        animation(draw)
    </script>
</body>

</html>